package com.itfitness.svgmap.activitys;

import android.os.Bundle;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.itfitness.svgmap.MainActivity;
import com.itfitness.svgmap.R;
import com.wxy.chinamapview.view.ChinaMapView;

/**
 * @ProjectName: SvgMap
 * @Package: com.itfitness.svgmap.activitys
 * @ClassName: MapLibActivity
 * @Description: java类作用描述 第三方的中国地图
 * @Author: 作者名
 * @CreateDate: 2020/11/15 15:59
 * @UpdateUser: 更新者：itfitness
 * @UpdateDate: 2020/11/15 15:59
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class MapLibActivity extends AppCompatActivity {
    private ChinaMapView map;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_maplib);
        map = (ChinaMapView) findViewById(R.id.map);
        map.setScaleMin(1);
        map.setScaleMax(3);
        map.setOnProvinceClickLisener(new ChinaMapView.onProvinceClickLisener() {
            @Override
            public void onSelectProvince(String provinceName) {
                Toast.makeText(MapLibActivity.this, provinceName, Toast.LENGTH_SHORT).show();
            }
        });
    }
}
